# encoding: utf-8


"""

@author: tongzhenguo

@time: 2021/5/13 下午11:06

@desc:


"""

import matplotlib.pyplot as plt
from pylab import mpl


class MyMatPlotLib(object):
    def __init__(self):
        mpl.rcParams['font.sans-serif'] = ['SimHei']
        mpl.rcParams['axes.unicode_minus'] = False

    def plot(self, df, x_range, figsize, title, **kwargs):
        df.loc[x_range[0]:x_range[1]].plot(figsize=figsize)
        ax = plt.gca()
        ax.spines['right'].set_color('none')
        ax.spines['top'].set_color('none')
        plt.title(title, fontsize=kwargs["frozenset"])
        plt.xlabel('')
        plt.show()
